﻿@model CMS2.Models.Class

@{
    ViewBag.Title = "Allocate";
}

<h2>Allocate</h2>

<fieldset>
    <legend>Class</legend>

    <div class="display-label">Name</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Name)
    </div>

    <div class="display-label">Section</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Section)
    </div>
    <div class="display-label">Allocated Subjects</div>
    <ul>
    @if (Model.Subjects != null)
    {

        foreach (var item in Model.Subjects)
        {
        
                <li>@item.Name</li>     
        
        }
    }
    else
    {
        <li>None</li>
    }
    </ul>

    
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id=Model.Id }) |
    @Html.ActionLink("Back to List", "Index")
</p>
